package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysStoreOpenMapper;
import com.ruoyi.system.domain.SysStoreOpen;
import com.ruoyi.system.service.ISysStoreOpenService;

/**
 * 门店开单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-30
 */
@Service
public class SysStoreOpenServiceImpl implements ISysStoreOpenService 
{
    @Autowired
    private SysStoreOpenMapper sysStoreOpenMapper;

    /**
     * 查询门店开单管理
     * 
     * @param id 门店开单管理主键
     * @return 门店开单管理
     */
    @Override
    public SysStoreOpen selectSysStoreOpenById(String id)
    {
        return sysStoreOpenMapper.selectSysStoreOpenById(id);
    }

    /**
     * 查询门店开单管理列表
     * 
     * @param sysStoreOpen 门店开单管理
     * @return 门店开单管理
     */
    @Override
    public List<SysStoreOpen> selectSysStoreOpenList(SysStoreOpen sysStoreOpen)
    {
        return sysStoreOpenMapper.selectSysStoreOpenList(sysStoreOpen);
    }

    /**
     * 新增门店开单管理
     * 
     * @param sysStoreOpen 门店开单管理
     * @return 结果
     */
    @Override
    public int insertSysStoreOpen(SysStoreOpen sysStoreOpen)
    {
        sysStoreOpen.setCreateTime(DateUtils.getNowDate());
        return sysStoreOpenMapper.insertSysStoreOpen(sysStoreOpen);
    }

    /**
     * 修改门店开单管理
     * 
     * @param sysStoreOpen 门店开单管理
     * @return 结果
     */
    @Override
    public int updateSysStoreOpen(SysStoreOpen sysStoreOpen)
    {
        sysStoreOpen.setUpdateTime(DateUtils.getNowDate());
        return sysStoreOpenMapper.updateSysStoreOpen(sysStoreOpen);
    }

    /**
     * 批量删除门店开单管理
     * 
     * @param ids 需要删除的门店开单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysStoreOpenByIds(String[] ids)
    {
        return sysStoreOpenMapper.deleteSysStoreOpenByIds(ids);
    }

    /**
     * 删除门店开单管理信息
     * 
     * @param id 门店开单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysStoreOpenById(String id)
    {
        return sysStoreOpenMapper.deleteSysStoreOpenById(id);
    }
}
